/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proxy;

import java.io.FileReader;
import java.io.IOException;
import java.io.LineNumberReader;
import java.util.ArrayList;

/**
 *
 * @author Hue
 */
public class OtherServers implements Servers {
    private String filename;

    public OtherServers(String vpnServerFile) {
        this.filename = vpnServerFile;
    }

    @Override
    public ArrayList<String> get() {
        ArrayList<String> list = new ArrayList<String>();
        try {
            LineNumberReader reader = new LineNumberReader(new FileReader(filename));
            String s;
            while((s = reader.readLine()) != null) {
                list.add(s.trim());
            }
            reader.close();
        }
        catch(IOException ex) {
            System.out.println(ex);
        }

        return list;
    }
    
}
